/**
 * ifuner 制作 @18658226071@163.com
 */

"use strict"
export default {
    data() {
        return {
            // searchKey定义
            __SEARCH_RESULT__: {}
        }
    },
    methods: {
        GET_SEARCH_DATA(__SEARCH_KEYS__ = {}) {
            console.warn("__SEARCH_KEYS__", __SEARCH_KEYS__)
            this.__SEARCH_RESULT__ = this.$utils.filterSearchParams(this.$route.query, __SEARCH_KEYS__)
            return this.__SEARCH_RESULT__
        },
        SET_SEARCH_DATA(query = {}, __SEARCH_KEYS__ = {}) {
            const queryParams = this.$utils.formatSearchParams(Object.assign({}, JSON.parse(JSON.stringify(this.__SEARCH_RESULT__)), query), __SEARCH_KEYS__)
            this.$router.replace({name: this.$route.name, query: queryParams})
        },
    }
}
